<?php
/**
 * App Store 配制接口文件
 *
 */

//根据环境修改引入的配制文件
$__env_file = 'release';
$__env_files = array(
    'DEV'  => 'dev',
    'TEST' => 'test',
    'ONLINE' => 'release',
);
if (defined('__OA_ENV')) {
    $__env_file = $__env_files[__OA_ENV];
} else if (defined('__UC_ENV')) {
    $__env_file = $__env_files[__UC_ENV];
}

#$__env_file = '';

require_once dirname(__FILE__)."/configs/for_{$__env_file}.php";

function sdo_app_store_partition_256_by_md5_hash($objId)
{
    return hexdec(substr(md5($objId), 0, 2)) + 1;  
}

function sdo_app_store_partition_16_by_md5_hash ($objId)
{
    return hexdec(substr(md5($objId), 0, 2)) % 16 + 1;
}

function sdo_app_store_partition_1($objId)
{
    return 1;
}
